while{true}do{
	waituntil {(count RUM_AHel_ServerGunFire) > 0};

	_tar = RUM_AHel_ServerGunFire select 0;
	_firerate = RUM_AHel_ServerGunFire select 1;
	_mtype = RUM_AHel_ServerGunFire select 2;
	_helo = RUM_AHel_ServerGunFire select 3;
	_weaponclass = RUM_AHel_ServerGunFire select 4;
	_fireHeight = RUM_AHel_ServerGunFire select 5;
	_grp = RUM_AHel_ServerGunFire select 6;
	_rof = RUM_AHel_ServerGunFire select 7;

	_pilot = driver _helo;
	_grp = group _pilot;
	switch (_mtype) do {

	//=================================== Canon Fire ==========================================//
		case "SFS":{
		// [nil,nil,rHINT,"This is the SFS Fire Section"] call RE;

			//fires canon at the the lased target - works - firerate is set at the top of this file.
			//classnames - M230 is for the Apache - M197 is for the Cobra

		// [nil,nil,rHINT,"Firing Canon - Server"] call RE;

			objDone = true;
			while {objDone} do {
				_helo fireAtTarget [_tar,_weaponclass];
					waitUntil {_firerate = _firerate - 1; sleep .042; _firerate < 0 || objDone};
						if (_firerate < 0) then {
							objDone = false;
						};
			};
			
			RUM_AHel_ServerGunFire = [];
			publicVariable "RUM_AHel_ServerGunFire";

		};

	//=================================== Hellfire Missile ===================================//
		case "ATGM":{

		// [nil,nil,rHINT,"This is the ATGM Fire Section"] call RE;

			//classname - hellfirelauncher

		// [nil,nil,rHINT,"Missile Away - Server"] call RE;
		
			_bool = _helo fireAtTarget [_tar,_weaponclass];
			waitUntil{_bool};
			// _pilot sidechat "Missile Away";
			
			RUM_AHel_ServerGunFire = [];
			publicVariable "RUM_AHel_ServerGunFire";

		};	

	//=================================== FFAR Rocket Barrage ================================//
		case "FFAR":{
			//classname - FFARLauncher
		
		};	
	};
};